﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Petaframe.Generation
{
    public static class ProjectFileContent
    {
        public static string Content = "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                                        "<Project ToolsVersion=\"4.0\" DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">" + Environment.NewLine +
                                        "<PropertyGroup>" + Environment.NewLine +
                                        "  <Configuration Condition=\" '$(Configuration)' == '' \">Debug</Configuration>" + Environment.NewLine +
                                        "  <Platform Condition=\" '$(Platform)' == '' \">AnyCPU</Platform>" + Environment.NewLine +
                                        "  <ProductVersion>8.0.30703</ProductVersion>" + Environment.NewLine +
                                        "  <SchemaVersion>2.0</SchemaVersion>" + Environment.NewLine +
                                        "  <ProjectGuid>{{0}}</ProjectGuid>" + Environment.NewLine +
                                        "  <OutputType>Library</OutputType>" + Environment.NewLine +
                                        "  <AppDesignerFolder>Properties</AppDesignerFolder>" + Environment.NewLine +
                                        "  <RootNamespace>{1}</RootNamespace>" + Environment.NewLine +
                                        "  <AssemblyName>{2}</AssemblyName>" + Environment.NewLine +
                                        "  <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>" + Environment.NewLine +
                                        "  <FileAlignment>512</FileAlignment>" + Environment.NewLine +
                                        "</PropertyGroup>" + Environment.NewLine +
                                        "<PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' \">" + Environment.NewLine +
                                        "  <DebugSymbols>true</DebugSymbols>" + Environment.NewLine +
                                        "  <DebugType>full</DebugType>" + Environment.NewLine +
                                        "  <Optimize>false</Optimize>" + Environment.NewLine +
                                        "  <OutputPath>bin\\Debug\\</OutputPath>" + Environment.NewLine +
                                        "  <DefineConstants>DEBUG;TRACE</DefineConstants>" + Environment.NewLine +
                                        "  <ErrorReport>prompt</ErrorReport>" + Environment.NewLine +
                                        "  <WarningLevel>4</WarningLevel>" + Environment.NewLine +
                                        "</PropertyGroup>" + Environment.NewLine +
                                        "<PropertyGroup Condition=\" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' \">" + Environment.NewLine +
                                        "  <DebugType>pdbonly</DebugType>" + Environment.NewLine +
                                        "  <Optimize>true</Optimize>" + Environment.NewLine +
                                        "  <OutputPath>bin\\Release\\</OutputPath>" + Environment.NewLine +
                                        "  <DefineConstants>TRACE</DefineConstants>" + Environment.NewLine +
                                        "  <ErrorReport>prompt</ErrorReport>" + Environment.NewLine +
                                        "  <WarningLevel>4</WarningLevel>" + Environment.NewLine +
                                        "</PropertyGroup>" + Environment.NewLine +
                                        "<ItemGroup>" + Environment.NewLine +
                                        " {3}" +
                                        "  <Reference Include=\"System\" />" + Environment.NewLine +
                                        "  <Reference Include=\"System.Core\" />" + Environment.NewLine +
                                        "  <Reference Include=\"System.Data.DataSetExtensions\" />" + Environment.NewLine +
                                        "  <Reference Include=\"Microsoft.CSharp\" />" + Environment.NewLine +
                                        "  <Reference Include=\"System.Data\" />" + Environment.NewLine +
                                        "  <Reference Include=\"System.Xml\" />" + Environment.NewLine +
                                        "</ItemGroup>" + Environment.NewLine +
                                        "<ItemGroup>" + Environment.NewLine +
                                        "{4}<Compile Include=\"Properties\\AssemblyInfo.cs\" />" + Environment.NewLine +
                                        "</ItemGroup>" + Environment.NewLine +
                                        "<Import Project=\"$(MSBuildToolsPath)\\Microsoft.CSharp.targets\" />" + Environment.NewLine +
                                        "<!-- To modify your build process, add your task inside one of the targets below and uncomment it. " + Environment.NewLine +
                                        "     Other similar extension points exist, see Microsoft.Common.targets." + Environment.NewLine +
                                        "<Target Name=\"BeforeBuild\">" + Environment.NewLine +
                                        "</Target>" + Environment.NewLine +
                                        "<Target Name=\"AfterBuild\">" + Environment.NewLine +
                                        "</Target>" + Environment.NewLine +
                                        "-->" + Environment.NewLine +
                                        "</Project>";

        public static string DALReferences = "  <Reference Include=\"Petaframe.DataAccess, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL\">" + Environment.NewLine +
                                            "    <SpecificVersion>False</SpecificVersion>" + Environment.NewLine +
                                            "    <HintPath>bin\\Debug\\Petaframe.DataAccess.dll</HintPath>" + Environment.NewLine +
                                            "  </Reference>" + Environment.NewLine;

        public static string BSReferences(string dataTypeNamespace)
        {
            return  "  <Reference Include=\"Petaframe.Business, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL\">" + Environment.NewLine +
                    "    <SpecificVersion>False</SpecificVersion>" + Environment.NewLine +
                    "    <HintPath>bin\\Debug\\Petaframe.Business.dll</HintPath>" + Environment.NewLine +
                    "  </Reference>" + Environment.NewLine +
                    "  <Reference Include=\"Petaframe.DataAccess, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL\">" + Environment.NewLine +
                    "    <SpecificVersion>False</SpecificVersion>" + Environment.NewLine +
                    "    <HintPath>bin\\Debug\\Petaframe.DataAccess.dll</HintPath>" + Environment.NewLine +
                    "  </Reference>" + Environment.NewLine +
                    "  <Reference Include=\"" + dataTypeNamespace + ", Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL\">" + Environment.NewLine +
                    "    <SpecificVersion>False</SpecificVersion>" + Environment.NewLine +
                    "    <HintPath>bin\\Debug\\" + dataTypeNamespace + ".dll</HintPath>" + Environment.NewLine +
                    "  </Reference>" + Environment.NewLine;
        }
    }
}
